<template>
    <div class="EmoticonListCover" v-if="Show" @click="OpenEmotion(false)">
        <p>全部表情</p>
        <div class="EmoticonList">
            <div class="PicItem" v-for="(item,i) in EmotionList" @click="ClickEmoticon(i)" :key="i">
                <img :src=" 'https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/' + i + '.gif'">
            </div>
        </div>
    </div>
</template>

<script>
  export default {
    name: "Emotion",
    data:function(){
      return {
        Show:false,
        EmotionList:['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭',
          '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱',
          '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘',
          '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼',
          '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒',
          '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹',
          '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引',
          '拳头', '差劲', '爱你', 'NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手',
          '激动', '街舞', '献吻', '左太极', '右太极'],
      }
    },
    methods:{
      //选中表情
      ClickEmoticon:function (EmoticonNo) {
        var That = this;
        That.Show = false;
        That.$emit('AppendInputValue','[[' + That.EmotionList[EmoticonNo] + ']]');
      },
      OpenEmotion:function (Value) {
        this.Show = Value;
      }
    }
  }
</script>

<style scoped lang="less">
.EmoticonListCover{
    background-color: white;
    border-radius: 12px;
    position: absolute;
    z-index: 99;
    height: 200px;
    overflow: auto;
    overflow-x: hidden;
    box-shadow: 2px 2px 7px #393939;
    top: -195px;
    left: 4px;
    p{
        line-height: normal;
        padding: 10px 20px;
        padding-bottom: 0;
        margin: 0;
    }
}
.EmoticonList{
    width: 300px;
    display: flex;
    flex-wrap: wrap;
    z-index: 99;
    position: relative;
    padding: 0 10px;
    padding-bottom: 5px;
    .PicItem{
        padding: 7px;
        line-height: normal;
    }
    .PicItem:hover{
        background-color: #bbbbbb;
    }
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-thumb {
    border-radius: 10px !important;
    background-color: #bbbbbb;
}

::-webkit-scrollbar-track {
    border-radius: 10px !important;
    background: #ededed !important;
}
</style>